﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson;

namespace Client.Library
{
    class ProductReport
    {
        public ObjectId Id { get; set; }
        public int ProductId { get; set; }
        public string ProductName { get; set; }
        public string VendorName { get; set; }
        public long SoldQuantity { get; set; }
        public decimal TotalIncome { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("{");

            sb.AppendLine("\"product-id\" : " + this.ProductId);
            sb.AppendLine("\"product-name\" : " + this.ProductName);
            sb.AppendLine("\"vendor-name\" : " + this.VendorName);
            sb.AppendLine("\"total-quantity-sold\" : " + this.SoldQuantity);
            sb.AppendLine("\"total-income\" : " + this.TotalIncome);

            sb.AppendLine("}");

            return sb.ToString();
        }
    }
}
